package main

import "fmt"

func main() {
	sum:=0
	for i:=0 ;i<10;i++{
		sum+=i
	}

	sum:=0
	for {
		sum++
		if sum >100{
			break
		}
	}

	//在条件表达式中也支持多重赋值，如下所示：
	a := []int{1, 2, 3, 4, 5, 6}
	for i, j := 0, len(a) – 1; i < j; i, j = i + 1, j – 1 {
		a[i], a[j] = a[j], a[i]
	}
	for j := 0; j < 5; j++ {
		for i := 0; i < 10; i++ {
			if i > 5 {
				break JLoop
			}
			fmt.Println(i)
		}
	}
	JLoop:
}
